package org.papervision3d.materials
{
    import org.papervision3d.core.proto.MaterialObject3D;

    // The WireframeMaterial class creates a wireframe material, where only the outlines of the faces are drawn.
    // Materials collects data about how objects appear when rendered.
    public class WireframeMaterial extends MaterialObject3D
    {
        // The WireframeMaterial class creates a wireframe material, where only the outlines of the faces are drawn.
        // @param    asset               A BitmapData object.
        // @param    initObject          [optional] - An object that contains additional properties with which to populate the newly created material.
        public function WireframeMaterial(color:Number = 0xFF00FF, alpha:Number = 100, initObject:Object = null)
        {
            super(initObject);
    
            this.lineColor   = color;
            this.lineAlpha   = alpha;
    
            this.doubleSided = true;
        }
    
        // Returns a string value representing the material properties in the specified WireframeMaterial object.
        // @return   A string.
        public override function toString(): String
        {
            return 'WireframeMaterial - color:' + this.lineColor + ' alpha:' + this.lineAlpha;
        }
    }
}
